<template>
  <div class="app-container home">
    <el-row :gutter="20">
      <h2>posp解析测试</h2>
    </el-row>
    <el-row :gutter="20">
        <p>
          <el-input
            type="textarea"
            v-model="pospStrParam"
            maxlength="20000npm"
            rows = "10"
            show-word-limit
          ></el-input>
        </p>
    </el-row>
    <el-row :gutter="20">
        <el-button
          type="primary"
          size="mini"
          icon="el-icon-cloudy"
          plain
          @click="submit()"
        >开始解析</el-button>
    </el-row>
    <el-row :gutter="20">
      <h2>解析结果</h2>
    </el-row>
    <el-row :gutter="20">
      <el-input
        type="textarea"
        :readonly=true
        v-model="pospStrRes"
        maxlength="800"
        rows = "10"
        show-word-limit
      ></el-input>
    </el-row>
  </div>
</template>

<script>
import { getParseRes } from "@/api/posp/posp";
export default {
  name: "Index",
  data() {
    return {
      // 版本号
      pospStrParam:"" ,
      pospStrRes: ""
    };
  },
  methods: {

    submit() {
      let obj = {
        pospStr:this.pospStrParam,
      }
      getParseRes(obj).then(response => {
        this.pospStrRes = JSON.stringify(response.data);
      });
    }
  },
};
</script>

<style scoped lang="scss">
.home {
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;
  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;
    b {
      font-weight: 700;
    }
  }
}
</style>

